﻿using OpenMms.Domain.Models;
using OpenMms.Domain.ReponseModels;
using OpenMms.Domain.RequestModels;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using X.PagedList;

namespace OpenMms.Domain.Interface.User
{
    public interface IUserUpgradeService
    {
        /// <summary>
        /// 会员升级操作
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<Response> Do(UserUpGradeReq model);
        /// <summary>
        /// 获取会员信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<UserInforMations> GetInforMations(string code);
        /// <summary>
        /// 可晋升级别
        /// </summary>
        /// <param name="level"></param>
        /// <returns></returns>
        Task<IList<MemberLevelViewModel>> QueryMemberLevel(int level);
        /// <summary>
        /// 计算差额
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<decimal> CalcAmount(UserUpGradeReq model);
        /// <summary>
        /// 查询升级记录
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="pageIndex"></param>
        /// <returns></returns>
        Task<IPagedList<UserUpgrade>> UpRecord(string code, int? pageIndex);
    }
}
